home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / Mesa-2.2 / include / GL / wmesa.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-22  |  2.7 KB  |  121 lines

  1. /* $Id: wmesa.h,v 1.2 1997/02/22 16:48:49 brianp Exp $ */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  2.2
  6.  * Copyright (C) 1995-1997  Brian Paul
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library; if not, write to the Free
  20.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  *
  22.  * Windows driver by: Mark E. Peterson (markp@ic.mankato.mn.us)
  23.  * Updated by Li Wei (liwei@aiar.xjtu.edu.cn)
  24.  *
  25.  */
  26.  
  27.  
  28. /*
  29.  * $Log: wmesa.h,v $
  30.  * Revision 1.2  1997/02/22 16:48:49  brianp
  31.  * WMesaDestroyContext now takes no arguments
  32.  *
  33.  * Revision 1.1  1996/09/13 01:26:41  brianp
  34.  * Initial revision
  35.  *
  36.  */
  37.  
  38.  
  39.  
  40. #ifndef WMESA_H
  41. #define WMESA_H
  42.  
  43.  
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47.  
  48.  
  49. #include <windows.h>
  50. #include "gl\gl.h"
  51.  
  52.  
  53. /*
  54.  * This is the WMesa context 'handle':
  55.  */
  56. typedef struct wmesa_context *WMesaContext;
  57.  
  58.  
  59.  
  60. /*
  61.  * Create a new WMesaContext for rendering into a window.  You must
  62.  * have already created the window of correct visual type and with an
  63.  * appropriate colormap.
  64.  *
  65.  * Input:
  66.  *         hWnd - Window handle
  67.  *         Pal  - Palette to use
  68.  *         rgb_flag - GL_TRUE = RGB mode,
  69.  *                    GL_FALSE = color index mode
  70.  *         db_flag - GL_TRUE = double-buffered,
  71.  *                   GL_FALSE = single buffered
  72.  *
  73.  * Note: Indexed mode requires double buffering under Windows.
  74.  *
  75.  * Return:  a WMesa_context or NULL if error.
  76.  */
  77. extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE Pal,
  78.                                        GLboolean rgb_flag,GLboolean db_flag);
  79.  
  80.  
  81. /*
  82.  * Destroy a rendering context as returned by WMesaCreateContext()
  83.  */
  84. /*extern void WMesaDestroyContext( WMesaContext ctx );*/
  85. extern void WMesaDestroyContext( void );
  86.  
  87.  
  88. /*
  89.  * Make the specified context the current one.
  90.  */
  91. extern void WMesaMakeCurrent( WMesaContext ctx );
  92.  
  93.  
  94. /*
  95.  * Return a handle to the current context.
  96.  */
  97. extern WMesaContext WMesaGetCurrentContext( void );
  98.  
  99.  
  100. /*
  101.  * Swap the front and back buffers for the current context.  No action
  102.  * taken if the context is not double buffered.
  103.  */
  104. extern void WMesaSwapBuffers(void);
  105.  
  106.  
  107. /*
  108.  * In indexed color mode we need to know when the palette changes.
  109.  */
  110. extern void WMesaPaletteChange(HPALETTE Pal);
  111.  
  112.  
  113.  
  114. #ifdef __cplusplus
  115. }
  116. #endif
  117.  
  118.  
  119. #endif
  120.  
  121.